<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                <option value="{$key}" {in name="key" value="alone"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Item_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <span class="input-group-addon">不超过</span>
                <input id="c-item_number" class="form-control" step="1" name="row[item_number]" type="number" value="">
                <span class="input-group-addon">件</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <span class="input-group-addon">不超过</span>
                    <input id="c-total_number" class="form-control" name="row[total_number]" type="number">
                <span class="input-group-addon">件</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-weight" class="form-control" step="0.01" name="row[weight]" type="number">
                <span class="input-group-addon">Kg</span>
            </div>
        </div>
    </div>
    <div class="form-group mix-many " style="display: none">
        <label class="control-label col-xs-12 col-sm-2">混装规则:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[content]" data-template="content_fieldtpl">
                <dd>
                    <ins style="width: 300px">单品名称</ins>
                    <ins>限量</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <textarea name="row[content]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
            <!--以下是自定义模板的内容-->
            <script type="text/html" id="content_fieldtpl">
                <dd class="form-inline">
                    <input  style="width: 300px" type="text" name="<%=name%>[<%=index%>][rule_ids]" class="form-control selectpage" data-multiple="true" data-params='{"custom[type]":"alone"}'  data-source="wanlshop/packagerule" size="10" value="<%=row.rule_ids%>">
                    <input type="text" name="<%=name%>[<%=index%>][number]" class="form-control" size="10" value="<%=row.number%>">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>

                </dd>
            </script>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
